package github.kawaiior.yuanchuxiuzhen.common.block.hell;

import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;

public class HellVineBlock extends Block {

    public HellVineBlock() {
        super(Properties.create(Material.IRON).hardnessAndResistance(1.5f,10f) );
    }

    private static final VoxelShape shape;

    static {
        VoxelShape top = Block.makeCuboidShape(6, 0, 2, 10, 16, 6);
        VoxelShape middle = Block.makeCuboidShape(2, 0, 6, 14, 16, 10);
        VoxelShape bottom = Block.makeCuboidShape(6, 0, 10, 10, 16, 14);
        shape = VoxelShapes.or(top, middle, bottom);
    }

    @Override
    public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
        return shape;
    }
}
